import { logService } from './../log.service';
import { Component } from '@angular/core';

@Component({
  selector: 'app-zero',
  templateUrl: './zero.component.html',
  styleUrls: ['./zero.component.css'],
})
export class ZeroComponent {
  logService: logService;
  constructor(log: logService) {
    // 不需要自己new，服务提供者会创建，直接使用
    this.logService = log;
  }
  addClick() {
    console.log('添加中...');
    this.logService.doLog('创建');
  }
  deleteClick() {
    console.log('删除中...');
    this.logService.doLog('删除');
  }
}
